// SquareLine LVGL GENERATED FILE
// EDITOR VERSION: SquareLine Studio 1.1.1
// LVGL VERSION: 8.2.0
// PROJECT: SquareLine_Project

#ifndef _SQUARELINE_PROJECT_UI_H
#define _SQUARELINE_PROJECT_UI_H

#ifdef __cplusplus
extern "C" {
#endif

#include "../lvgl/lvgl.h"
#include "res.h"
#include "GD25Q128E_CMD.h"
#include "ui_helpers.h"
#define MAX_SCREEN 6
extern char g_index;
extern uint8_t frambuffer[240*283*2];
extern lv_obj_t * ui_Screen1;
extern lv_obj_t * ui_Screen1_Image1;
void ui_event_Screen2(lv_event_t * e);
extern lv_obj_t * ui_heartScreen;
extern lv_obj_t * ui_Screen2_ImgButton1;
extern lv_obj_t * ui_Screen2_Label2;
void ui_event_Screen3(lv_event_t * e);
extern lv_obj_t * ui_Screen3;
extern lv_obj_t * ui_Screen3_ImgButton2;
extern lv_obj_t * ui_Screen3_Label1;
void ui_event_Screen4(lv_event_t * e);
extern lv_obj_t * ui_sleepScreen;
extern lv_obj_t * ui_sportScreen1;
extern lv_obj_t * ui_Screen3_ImgButton1;
void ui_event_Screen3_Label2(lv_event_t * e);
extern lv_obj_t * ui_Screen3_Label2;
extern lv_obj_t * ui_bluetoothImag;
extern lv_obj_t * ui_heartTestScreen_Chart1;
extern lv_chart_series_t* ser_wa;
extern lv_obj_t * ui_percentValue;
extern lv_obj_t * ui_bpmValue;
extern lv_obj_t * ui_PIValue;
extern lv_obj_t * ui_RRValue;
extern lv_obj_t * ui_Screen1_Label5;
extern lv_obj_t * ui_Screen1_Label6;
extern lv_obj_t * ui_Screen1_Label8;

extern lv_obj_t *screen_before;
enum screen_status
{
    idle=0,
    heart_testing=1,
	  heart_tested,
    temp_testing,
		temp_tested,
    sport_test,
	 
    lowper_test,
    xxx_test,
		charge_test,
		standby_test,
		pre_work_test,
		work_test,
		upload_test

};
enum loadres
{
	nores,
	Mhealth_res,
	Mtemp_res,
	Msleep_res,
	Msport_res,
	Mhistory_res,
	Msetting_res,
	Dfinger_res,
	Dwrist_res,
	hrtest_res01,
	hrtest_res02,
	hrtest_res03,
	hrtest_res04,
	temptest_res01,
	temptest_res02,
	temptest_res03,
	temptest_res04,
	logo_res
};
struct Res_Measure
{
	char timestamp[30];
	int  temp_res;
	int  hr_res;
	int  spo2_res;
};
extern struct Res_Measure g_res_measure;
extern int g_wrist_control;
struct screen_
{
    lv_obj_t * screen;
    lv_obj_t *timeLabel;
    lv_obj_t *bluetooth;
		lv_obj_t *battery;
    lv_obj_t *icon;
    lv_obj_t *next;
    lv_obj_t *pre;
};
extern struct screen_ myscreen[MAX_SCREEN];
extern enum loadres g_loadres;
extern  enum screen_status g_screen_status;
extern lv_obj_t *ui_Screen1;
extern lv_obj_t *ui_Screen2;
extern lv_obj_t *ui_tempScreen;
extern lv_obj_t *ui_Screen4;
extern lv_obj_t *ui_Screen5;
extern lv_obj_t *ui_Screen6;
extern lv_obj_t *ui_SettingsUnit;
extern lv_obj_t * ui_Screen1_Label1;
extern lv_obj_t *ui_Screen2_Panel1;
extern lv_obj_t *ui_Screen2_Panel2;
extern lv_obj_t *ui_Screen2_Panel3;
extern lv_obj_t *ui_Screen2_Panel4;
extern lv_style_t my_style;
LV_IMG_DECLARE(ui_img_logo_png);    // assets\logo.png
LV_IMG_DECLARE(ui_img_health_png);    // assets\health.png
LV_IMG_DECLARE(ui_img_temp_png);    // assets\Temp.png
LV_IMG_DECLARE(ui_img_sleeping_png);    // assets\sleeping.png

LV_IMG_DECLARE(ui_img_sport_png);    // assets\sleeping.png
LV_IMG_DECLARE(ui_img_history_png);    // assets\sleeping.png
LV_IMG_DECLARE(ui_img_setting_png);    // assets\sleeping.png
LV_IMG_DECLARE(ui_img_sport_png);    // assets\sleeping.png
LV_IMG_DECLARE(ui_img_finger_png);    // assets\sleeping.png
LV_IMG_DECLARE(ui_img_wrist_png);    // assets\sleeping.png
LV_IMG_DECLARE(ui_img_tempss_png);    // assets\sleeping.png
LV_IMG_DECLARE(ui_img_resps_png);    // assets\sleeping.png
LV_IMG_DECLARE(ui_img_hrs_png);    // assets\sleeping.png
LV_IMG_DECLARE(ui_img_spo2s_png);
LV_IMG_DECLARE(ui_img_hrtesting04_png);
LV_IMG_DECLARE(ui_img_hrtesting03_png);
LV_IMG_DECLARE(ui_img_hrtesting02_png);
LV_IMG_DECLARE(ui_img_hrtesting01_png);
LV_IMG_DECLARE(ui_img_bluetooth_png);    // assets\bluetooth.png
LV_IMG_DECLARE(ui_img_temptesting01_png);
LV_IMG_DECLARE(ui_img_temptesting02_png);
LV_IMG_DECLARE(ui_img_temptesting03_png);
LV_IMG_DECLARE(ui_img_temptesting04_png);


LV_IMG_DECLARE(ui_img_pi_png); 
LV_IMG_DECLARE(ui_img_hrv_png); 
LV_IMG_DECLARE(ui_img_left_png); 
LV_IMG_DECLARE(s_BT);
LV_IMG_DECLARE(s_brighting);
LV_IMG_DECLARE(s_time);
LV_IMG_DECLARE(s_about);
LV_IMG_DECLARE(s_clearData);
LV_IMG_DECLARE(s_recover);
LV_IMG_DECLARE(batteryfull);
LV_IMG_DECLARE(battery_75);
LV_IMG_DECLARE(battery_50);

LV_IMG_DECLARE(battery_25);

LV_IMG_DECLARE(battery_5);

LV_FONT_DECLARE(mybigFont);
LV_FONT_DECLARE(Bigfont);
void ui_init(void);
void ui_call_heart(void);
void ui_call_temp(void);
void brightness_level(char level);
void adjust_level(char level);
void update_Barstatus(void);
extern char g_system_brightness;
void charge_init(void);
char outputscale(int adc);
extern int g_total_files;
#ifdef __cplusplus
} /*extern "C"*/
#endif

#endif
